Skip to content

Conversation

@kaylareopelle
Copy link
Contributor

@kaylareopelle kaylareopelle commented Jan 16, 2025

For action_mailer, action_pack, action_view, delayed_job, and rails instrumentation the tests are failing on Rails 6.1 and 7.0 with an uninitialized constant error:

  /opt/hostedtoolcache/Ruby/3.3.6/x64/lib/ruby/gems/3.3.0/gems/
activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb :16:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

      Logger::Severity.constants.each do |severity|
      ^^^^^^

Requiring the logger in the test_helper resolves the error.

Relates to #1343

kaylareopelle and others added 2 commits January 15, 2025 18:50
For action_mailer, action_pack, action_view, delayed_job, and rails
the tests started failing with an uninitialized constant error:
  /opt/hostedtoolcache/Ruby/3.3.6/x64/lib/ruby/gems/3.3.0/gems/
activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb
:16:in `<module:LoggerThreadSafeLevel>': uninitialized constant
ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

      Logger::Severity.constants.each do |severity|
      ^^^^^^

Adding the logger library explicitly to the Appraisal resolves the
error.
@kaylareopelle kaylareopelle changed the title test: Add logger to Apprasials for Rails 6.1, 7.0 test: Add logger to test_helper in some Rails-related libraries Jan 16, 2025
@kaylareopelle kaylareopelle marked this pull request as ready for review January 16, 2025 03:11
@arielvalentin arielvalentin merged commit b840de9 into open-telemetry:main Jan 16, 2025
61 checks passed
@kaylareopelle kaylareopelle deleted the add-logger-to-old-rails branch January 16, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants